<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>

<script>
    var a=prompt("请输入一个数");
    var b=prompt("输入运算符");
    var c=prompt("请再输入一个数");
    var sum=0;
    var x=Math.abs(a);
    var y=Math.abs(c);
    while(b=="+"){
        sum=x+y;
        alert(sum);
    }
    while(b=="-"){
        sum=x-y;
        alert(sum);
    }
    while(b=="*"){
        sum=x*y;
        alert(sum);
    }
    while(b=="/"){
        sum=x/y;
        alert(sum);
    }


</script>
</html>